<template>
  <div class="head">
    <div class="head-l">
      <div class="row">
        <div class="tp"><img class="logo-img" :src="schoolLogo.logo_url"></div>
        <div class="class">
          <p class="class-p" v-html="classInfo.grade_class_eng&&classInfo.grade_class_eng.replace(/,/, '<br>')"></p>
          <p class="class-p">{{classInfo.grade_name}}</p>
        </div>
        <div class="team">
          <span class="team-s">{{_classInfo.class_name}}</span><span class="team-s">班</span>
        </div>
      </div>
      <!-- <div class="row">
        <div class="honor"><img src="@/components/temp4/imgs/tb09.png"></div>
        <div class="star">
          <span class="star-s" v-for="d of beautifulStars" :key="d.id">
            <p class="star-p"><img class="img" :src="d.image" :class="{gray:d.light==='false'}"></p>{{d.name}}
          </span>
        </div>
      </div> -->
    </div>
    <div class="head-r">
      <p class="dream-horse">
        <img v-if="dreamHorse.image" :src="dreamHorse.image" class="img" :class="{gray:dreamHorse.light==='false'}">
        <img v-else class="img" src="./imgs/tb02.png">
      </p>
      <Weather :cityName="$bus.cityName"></Weather>
    </div>
  </div>
</template>

<script>
import Weather from '@/modules/weather2/Weather1'
export default {
  props: {
    classInfo: {
      type: Object,
      default () { return {} }
    },
    schoolLogo: {
      type: Object,
      default () { return {} }
    },
    dreamHorse: {
      type: Object,
      default () { return {} }
    },
    beautifulStars: {
      type: Array,
      default () { return [] }
    }
  },
  components: {
    Weather
  },
  computed: {
    _classInfo () {
      let d = this.classInfo
      if (d.class_name) {
        d.class_name = d.class_name.replace('班', '')
      }
      return d
    }
  }
}
</script>

<style scoped>
.img.gray {
  filter: grayscale(100%);
  opacity: 0.8;
}

.star .img {
  border-radius: 40px;
  box-shadow: 0 0 0 #7e7e7e;
  margin-top: 5px;
}

.dream-horse .img {
  width: 130px;
  height: 130px;
  /* border-radius: 130px; */
  box-shadow: 0 0 0 #7e7e7e;
  /* vertical-align: bottom; */
}

/*顶端标题*/
.head {
  /* width: 1000px;
  height: 230px;
  padding: 35px 40px;
  float: left; */

  width: 1000px;
    height: 284px;
    padding: 35px 40px 0;
    box-sizing: border-box;
}
/*左侧内容*/
.head-l {
  float: left;
  width: auto;
  height: auto;
  overflow: hidden;
  margin-left: 20px;
}
.tp {
  float: left;
  width: 150px;
  height: 170px;
  margin-left: 7px;
  margin-right: 40px;
  margin-top: 4px;

}
.logo-img {
  width: 100%;
  border-radius: 150px;
  box-shadow: 0 0 12px #7e7e7e;
}

.row {
  clear: both;
}

.class {
  width: auto;
  height: 130px;
  padding: 40px 0 0;
  float: left;
  text-align: right;
}

.class-p {
  font-size: 45px;
  /* color: #444; */
  color: #fff;
}

.class-p:first-child {
  font-size: 12px;
}

.team {
  float: left;
  height: 170px;
  line-height: 170px;
}

.team-s {
  font-size: 100px;
  font-weight: bolder;
  /* color: #444; */
  color: #fff;
}

.team-s:first-child {
  /* color: #fff; */
  color: #fffd00;
}

.honor {
  float: left;
  width: 65px;
  height: 65px;
  margin-right: 40px;
  margin-top: 20px;
  img {
    width: 100%;
  }
}

.star {
  width: auto;
  height: 65px;
  margin-top: 20px;
  float: left;
  img {
    width: 40px;
  }
}

.star-s {
  display: block;
  width: 40px;
  height: 65px;
  margin-right: 20px;
  float: left;
  font-size: 12px;
  color: #fff;
}

/*左侧结束*/
.head-r {
  /* float: right;
  width: auto;
  overflow: hidden;
  text-align: right; */

  float: right;
  width: auto;
  overflow: hidden;
  text-align: right;
  margin-top: -20px;
}

.dream-horse {
  color: #fff;
  font-size: 20px;
}

</style>


